# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer: Carlo Landmeter <clandmeter@alpinelinux.org>
pkgname=unixodbc
pkgver=2.3.12
pkgrel=0
pkgdesc="ODBC is an open specification to access Data Sources"
url="https://www.unixodbc.org/"
arch="all"
license="LGPL-2.0-or-later"
options="!check"  # No test suite.
makedepends="readline-dev"
subpackages="$pkgname-static $pkgname-dev $pkgname-doc"
source="https://www.unixodbc.org/unixODBC-$pkgver.tar.gz"

builddir="$srcdir/unixODBC-$pkgver"

prepare() {
	default_prepare
	update_config_sub
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--disable-nls \
		--enable-gui=no \
		--enable-static
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
ca9d8db943195679a44db1fc09391dc6662ab1721112c93d448f04011e98502462ffe14b8364eb03707d851db456eced20eb61a22370392ca88d917038d45b56  unixODBC-2.3.12.tar.gz
"
